package com.xxlie.auth.security.auth.ajax;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.NotNull;

/**
 * 通过手机号注册请求
 *
 *
 * @author xxlie.com
 * @since 2017/12/19
 */
public class ResetRequest {

    private String password;
    private String phone;
    private String smsCode;

    @JsonCreator
    public ResetRequest(@JsonProperty("password") String password, @JsonProperty("phone") String phone, @JsonProperty("smsCode") String smsCode) {
        this.password = password;
        this.phone = phone;
        this.smsCode = smsCode;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @NotNull(message = "手机号不能为空")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @NotNull(message = "验证码不能为空")
    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }
}
